Desktop.AjaxCon = function () { }

Desktop.AjaxCon.prototype.getXHR = function () {
    var xhr = null;

    try {
        xhr = new XMLHttpRequest();
    } catch (error) {
        try {
            xhr = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (error) {
            throw new Error("No XHR object avaliable");
        }
    }
    return xhr;
}